package com.adam.kafkamq.consumer;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.cloud.stream.annotation.EnableBinding;
import org.springframework.cloud.stream.annotation.StreamListener;
import org.springframework.stereotype.Component;

/**
 * @author Adam
 * @date 2022/12/6 16:59
 * @desc 消费订单相关消息
 */
@Component
@EnableBinding(OmsSink.class)
public class Consumer {

    private Logger logger = LoggerFactory.getLogger(Consumer.class);

    @StreamListener(OmsSink.TEST_CHANNEL)
    public void inputChannel(String message) {
        logger.info("开始消费Test信道 消息:{}", message);
    }

    @StreamListener(OmsSink.TEST_DLT_CHANNEL)
    public void testDltChannel(String message) {
        logger.info("开始消费 Topic-name.dlt 信道 消息:{}", message);
    }
}
